<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./OL_SDK/include-openlayers-local.js"></script>
    <script src="./libs/gaode.js"></script>
    <script src="./utils/Point.js"></script>
</head>

<body>
    <div id="map">
    </div>
    <script>
        var docLayer = new Zondy.Map.Doc("", "xzd-plus", {

        })
        var map = new ol.Map({
            target: "map",
            layers: [gaode, docLayer],
            view: new ol.View({
                projection: 'EPSG:4326',
                center: [114.30, 30.50],
                zoom: 4
            })
        })
        map.on("click", evt => {
            let position = evt.coordinate;
            /* name,type,value */
            /* 实现添加时候attr = [] */
            let attr = [{
                name: "name",
                type: "string",
                value: "武汉"
            }]
            let service = {
                name: "xzd-plus",
                layerId: 0
            }
            Point.add({
                position,
                attr,
                service,
                docLayer
            })

        })
    </script>
</body>

</html>